{include file="header.html"}
<body class="gr">

<div class="navBar">
	<a class="left" href="wap.php?app=member&act=index"><i class="return"></i></a>
	<div class="titleView-x">投保记录</div>
</div>

<div class="order-history main-top">
	<ul class="switchView ge-bottom">
		{foreach from=$data item=g name=k}
		<li class="{if $smarty.foreach.k.index==0}this{/if}"><a href="javascript:void(0)" year="{$g[0]->year}">{$g[0]->year}年</a></li>
		{/foreach}
	</ul>

	{foreach from=$data item=g name=k}
	<ul class="list {if $smarty.foreach.k.index>0}hidden{/if}" year="{$g[0]->year}">
		<li class="ge-bottom"><span>缴纳月份</span><span>社保</span><span>公积金</span><span>操作</span></li>
		{foreach from=$g item=d}
		<li>
			<span class="month">{$d->date}</span>
			{if $d->status==1}
			<span class="check">已支付</span>
			<span class="check">已支付</span>
			{elseif $d->status==2}
			<span class="check">办理成功</span>
			<span class="check">办理成功</span>
			{else}
			<span class="status">未投保</span>
			<span class="status">未投保</span>
			{/if}
			{if $d->order_id>0}
			<span class="check"><a href="wap.php?app=member&act=order_detail&id={$d->order_id}">查看订单</a></span>
			{elseif $d->future==1}
			<span class="check"><a href="wap.php?app=cart&act=info">立即购买</a></span>
			{/if}
		</li>
		{/foreach}
	</ul>
	{/foreach}
</div>

{include file="footer.html"}
<script>
$(function(){
    $('.switchView a').click(function(){
		$('.list[year="'+$(this).attr('year')+'"]').removeClass('hidden').siblings('.list').addClass('hidden');
		$(this).parent().addClass('this').siblings().removeClass('this');
	});
});
</script>